package com.example.androidmainshixun.view;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.androidmainshixun.R;

public class AddAddress extends AppCompatActivity {
    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.add_shipping_address);

        Spinner spinnerSourceLocation = findViewById(R.id.source_location_spinner);

        @SuppressLint("ResourceType")
        ArrayAdapter<String> adapterSourceLocation = new ArrayAdapter<>(this,
                android.R.layout.simple_spinner_item, getResources().getStringArray(R.array.source_locations));

        spinnerSourceLocation.setAdapter(adapterSourceLocation);


        adapterSourceLocation.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    }
}
